package com.corner.ui.base;

import com.corner.app.App;
import com.corner.presenter.base.BasePresenter;
import com.corner.ui.view.base.BaseView;
import com.corner.utils.ToastUtil;

/**
 * Created by Administrator on 2015/7/13，14.52.
 * 描述：
 */
public abstract class BaseHolder<P extends BasePresenter> implements BaseView {

    protected P presenter;

    public BaseHolder() {
        this.presenter = createP();
        presenter.setView(this);
    }

    protected abstract P createP();

    @Override
    public void showLoading(boolean isShow) {
    }

    @Override
    public void showError(String message) {
        ToastUtil.showCustomToastInDevelop(App.application, message);
    }
}
